package com.woniuxy02;


import java.util.Scanner;

public class Test05 {

    public static void main(String[] args) {
        //地址为空
//        String str=null;
////        System.out.println(str.equals("aaa"));
//        System.out.println("aaa".equals(str));
//        System.out.println(str.isEmpty());

        //数据为空
        String s1="";
        System.out.println(s1.isEmpty());
        String s2="ab";
        System.out.println(s2.isEmpty());
        String s3=new String("");
        System.out.println(s3.isEmpty());
        System.out.println(s3.length());

        String s4="abcdefg";
        System.out.println(s4.charAt(0));
        System.out.println(s4.charAt(1));

        String s5 = new Scanner(System.in).next();
        System.out.println(s5);
        char c = new Scanner(System.in).next().charAt(0);
        System.out.println(c);
    }
}
